<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <script>

        // 面向对象：封装，继承，多态

        // 多态   say在不同类中表现出的多种形态

        // 继承   ？？？？



        class Dog {
            say() {
                console.log('汪');
            }
        }


        class Cat {
            say() {
                console.log('喵');
            }
        }


        class Person {
            say() {
                alert(666)
            }
        }


        const d = new Dog();
        d.say();


        const c = new Cat();
        c.say()

    </script>

</body>

</html>